package ThreadCreat;

import ThreadCreat.ThreadExtendsThread;

/**
 * ClassName ThreadCreat.Thread02
 * Description TODO
 * Author Hexiao
 * Date 2018/8/24 10:11
 * Version 1.0
 **/
public class Thread02 {
    private String str;
        public static void main(String[] args) {
            ThreadExtendsThread t1 = new ThreadExtendsThread();
            System.out.println("t1.Priority="+t1.getPriority());
            t1.str = "A";
            t1.setPriority(2);

            System.out.println("str="+t1.str+","+"t1.Priority="+t1.getPriority());

            ThreadExtendsThread t2 = new ThreadExtendsThread();
            System.out.println("t2.Priority="+t2.getPriority());
            t2.str = "B";
            t2.setPriority(1);
            System.out.println("str="+t2.str+","+"t1.Priority="+t2.getPriority());

            ThreadExtendsThread t3 = new ThreadExtendsThread();
            System.out.println("t3.Priority="+t3.getPriority());
            t3.str = "C";
            t3.setPriority(3);
            System.out.println("str="+t3.str+","+"t1.Priority="+t3.getPriority());

            t1.start();
            t2.start();
            t3.start();
        }
    }
